﻿

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>加班申请详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link href="../../../layuiadmin/style/mystyle.css" rel="stylesheet" />
    <script src="../../../layuiadmin/artdialog/artDialog.js?skins=chrome"></script>
    <script src="../../../layuiadmin/lib/jquery.min.js"></script>
    <script src="../../../layuiadmin/lib/api.js"></script>
    <script src="../../../layuiadmin/lib/common.js"></script>
    <!--编辑器-->
    <link href="../../../layuiadmin/kindeditor/themes/default/default.css" rel="stylesheet" />
    <script src="../../../layuiadmin/kindeditor/kindeditor-all.js"></script>
    <script src="../../../layuiadmin/kindeditor/lang/zh-CN.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../../plugins/common/login.js"></script>
    <script src="../../../layuiadmin/lib/system.js"></script>
    <script>
        //检查服务器是否已登录，没有登录则跳转至登录页。
        sys_islogin();
    </script>
</head>
<body>

    <div class="layui-fluid">
        <div class="layui-card">


            <div class="layui-card-body">
                <div class="layui-form" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
                    <div style="margin-bottom: 45px;">
                        <div class="layui-form-item">
                            <div>
                                <label class="layui-form-label">加班时间</label>
                                <div class="layui-input-inline">
                                    <span class="layui-form-label-new" id="STARTTIME" name="STARTTIME"></span>
                                </div>
                                <div class="layui-form-mid">
                                    -
                                </div>
                                <div class="layui-input-inline">
                                    <span class="layui-form-label-new" id="ENDTIME" name="ENDTIME"></span>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">加班时长</label>
                            <div>
                                <span name="TIMES" id="TIMES" lay-verify="" class="layui-form-label-new">
                                </span>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">提交用户</label>
                            <div>
                                <span name="REALNAME" id="REALNAME" lay-verify="" class="layui-form-label-new">
                                </span>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">审批人</label>
                            <div>
                                <span name="APPROVALNAME" id="APPROVALNAME" lay-verify="" class="layui-form-label-new">
                                </span>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">审批状态</label>
                            <div>
                                <span name="APPROVALSTATUS" id="APPROVALSTATUS" lay-verify="" class="layui-form-label-new">
                                </span>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">审批时间</label>
                            <div>
                                <span name="APPROVALTIME" id="APPROVALTIME" lay-verify="" class="layui-form-label-new">
                                </span>
                            </div>
                        </div>
                        
                        <div class="layui-form-item">
                            <label class="layui-form-label">审批原因</label>
                            <div class="layui-input-inline" style="width:80%;">
                                <span name="APPROVALREASON" id="APPROVALREASON" class="layui-form-label-new"></span>
                            </div>
                        </div>

                    </div>

                </div>
            </div>

        </div>
    </div>

    <script>
        function child_fill_data(id) {
            //获取日志
            $.ajax({
                url: "/TaskOverTimeMerber/GetOverTimeDetailByID",    //请求的url地址
                dataType: "json",   //返回格式为json
                //async: false,//请求是否异步，默认为异步，这也是ajax重要特性$("#attachCode").val()
                data: { id: id },    //参数值
                type: "GET",   //请求方式
                success: function (res) {
                    if (res) {
                        for (let key in res) {
                            if (key.toUpperCase() == 'APPROVALSTATUS') {
                                if (res[key] == 0) $("#" + key.toUpperCase()).html('<span style="color:green;">待审批</span>');
                                else if (res[key] == 1) $("#" + key.toUpperCase()).html('通过');
                                else if (res[key] == 2) $("#" + key.toUpperCase()).html('<span style="color:red;">驳回</span>');
                                else $("#" + key.toUpperCase()).html('未知状态');
                            }
                            else $("#" + key.toUpperCase()).html(res[key]);
                        }
                    }
                },
                error: function (res) {
                    console.log(res);
                    //layer.msg("任务附件获取失败，请联系技术人员");
                }
            })
        };
    </script>
</body>
</html>